package com.ktg.mes.pro.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.ktg.mes.md.domain.MdItem;
import com.ktg.mes.md.domain.MesScalesOrderItem;
import com.ktg.mes.util.LeftJoin;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktg.common.annotation.Excel;
import com.ktg.common.core.domain.BaseEntity;


/**
 * 客戶产品需求对象 pro_item_need
 *
 * @author byteco
 * @date 2022-12-12
 */

@Data
@Accessors(chain = true)
@TableName("pro_item_need")
public class ProItemNeed extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 关联销售订单
     */
    @LeftJoin(leftTable = "mes_scales_order_item",leftTableColumn = "scales_order_item_id",selectColumn = MesScalesOrderItem.ColumnScalesOrderId)
    private String scalesOrderItemId;


    /**
     * 关联销售订单
     */
    @TableField(exist = false)
    private String scalesOrderId;


    /** 客户ID */
    private String clientId;


    /** 客户编码 */
    private String clientCode;


    /** 客户名称 */
    @Excel(name = "客户名称")
    private String clientName;


    /** 客户简称 */
    private String clientNick;


    /** 产品ID */
    @LeftJoin(leftTable = "md_item",leftTableColumn = "item_id::varchar",selectColumn = "process_product_id,process_product_name")
    private String itemId;


    /** 产品编码 */
    private String itemCode;


    /** 产品名称 */
    @Excel(name = "产品名称")
    private String itemName;


    /** 产品规格 */
    @Excel(name = "产品规格")
    private String specification;


    /** 产品粘度 */
    @Excel(name = "产品粘度")
    private String viscosity;


    /** 产品单位 */
    @Excel(name = "产品单位")
    private String unitOfMeasure;

    @Excel(name = "是否有标签", width = 15)
    @ApiModelProperty(value = "是否有标签")
    private String tag;

    @Excel(name = "包装规格", width = 15)
    @ApiModelProperty(value = "包装规格")
    private String packingType;


    /** 需求时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "需求时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date needDate;


    /** 需求数量 */
    @Excel(name = "需求数量")
    private BigDecimal needCount;


    /** 需求备注 */
    @Excel(name = "需求备注")
    private String needRemark;


    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stockDate;


    /** 备货人ID */
    private String stockUserId;


    /** 备货人 */
    @Excel(name = "备货人")
    private String stockUserName;


    /** 备货数量 */
    @Excel(name = "备货数量")
    private BigDecimal stockCount;


    /** 备货备注 */
    @Excel(name = "备货备注")
    private String stockReamrk;



    /** 是否已发货 0需求中 10确定预出库  20备货中  30已发货*/
    @Excel(name = "是否已发货 0需求中 10确定预出库  20备货中  30已发货 ")
    private Long shippedType;


    /** 发货人ID */
    private String shippedUserId;

    /** 发货人 */
    private String shippedUserName;


    /** 发货时间 */
    @Excel(name = "发货时间")
    private Date shippedDate;


    /** 发货备注 */
    @Excel(name = "发货备注")
    private String shippedRemark;


    @Excel(name = "产品统计名称，作为同一个产品进行统计")
    @TableField(exist = false)
    private String processProductName;

    @Excel(name = "产品统计ID，作为同一个产品进行统计")
    @TableField(exist = false)
    private Long processProductId;


    private String dataSource;

}
